package heven.holt.library.initializer.startup

import android.content.Context
import heven.holt.library.loading.LoadingStateView
import heven.holt.library.loading.ViewType
import heven.holt.library.loading.delegate.EmptyViewDelegate
import heven.holt.library.loading.delegate.LoadingViewDelegate
import heven.holt.library.startup.AndroidStartup

class LoadingStateStartUp : AndroidStartup<Any>() {
    override fun create(context: Context): Any? {
        LoadingStateView.setViewDelegatePool {
            register(ViewType.LOADING, LoadingViewDelegate())
            register(ViewType.EMPTY, EmptyViewDelegate())
        }
        return null
    }

    override fun callCreateOnMainThread(): Boolean = true

    override fun waitOnMainThread(): Boolean = true
}